const state = {
  recordData: {
    active: 0,
    record: []
  }
  // recordData:[]
}
const mutations = {
  Change_RECORD: (state, active) => {
    state.recordData.active += active
    // state.recordData.record.push(record.record)
    // state.recordData.push(record)
  },
  ADD_RECORD: (state, record) => {
    state.recordData.active++
    state.recordData.record.splice(state.recordData.active-1)
    state.recordData.record.push(record)
  }
}
const actions = {
  changeRecord({ commit }, active) {
    commit('Change_RECORD', active)
  },
  addRecord({ commit }, record) {
    commit('ADD_RECORD', record)
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
